<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //无参无返回
    function f1() {
        console.log(f1);
    }
    f1();
/*无参有返回*/
    function f2() {
        return 1;
    }
    let info =f2();
    console.log(info)
    //有参无返回
    function f3(name,age) {
        console.log(name+":"+age)
    }
    f3("mcl",21);
    //有参有返回
    function f4(sex,hobby) {
        return sex+"," +hobby;
    }
    let result =f4("女","逛淘宝");
    console.log(result)

</script>
</body>
</html>